<style>table td{text-align: left;}</style>

<div class="account-wrapper">
    <div class="account-body" ng-controller="postAddCtrl">
        <h4>600小号发帖</h4>
        <form class="form account-form">
            <!--<div class="form-group">-->
            <!--<label class="control-label" for="textinput">displayOrder:</label>-->
            <!--<input class="form-control" ng-model="post.displayOrder" required tabindex="5">-->
            <!--</div>-->

            <!--<div class="form-group">-->
            <!--<label class="control-label" for="textinput">选择小区：&lt;!&ndash;community:&ndash;&gt;</label>-->
            <!--<label> <input style="zoom:1.8;margin-left: 10px;vertical-align:middle" ng-model="ck"-->
            <!--type="checkbox" ng-click="allCheck(ck)"/>全选</label>-->
            <!--<span style="margin-left:50px">点击全选会选择所有小区</span>-->
            <!--<br>-->
            <!--<label ng-repeat="m in communityLabelList.data">-->
            <!--<input type="checkbox" style="zoom:1.8;margin-left: 10px;vertical-align:middle" ng-model="chk"-->
            <!--ng-click="toggle(chk,m.objId)" name="chkItem"-->
            <!--/> {{m.communityName}}-->
            <!--</label>-->
            <!--</div>-->

            <div class="form-group">
                <label class="control-label" for="textinput">发帖号 : </label>
                <!--<a class="btn btn-secondary" href="/#/600post" style = "margin: -5px 0 0 20px;padding: 5px 8px;border-radius: 4px;">发帖号管理</a>-->
                <a style="float:right;margin-left: 20px" href="/#/numbergroup" class="btn btn-xs btn-primary">发帖号管理</a>
                <a style="float:right;" class="btn btn-xs btn-primary" ng-click="getGroupUserList()">选择发帖号</a>
                <br/>
                <br/>
                <textarea id ="txtNumber" class="control-label" rows="3" ng-model="postnumbers" required style="width:100%" placeholder="600123, 60090, ..." value=""></textarea>
                <a style="float:right;" class="btn btn-xs btn-primary" ng-click="getUserList(postnumbers)">详情</a>
            </div>
            <br/>
            <div class="form-group">
                <label class="control-label" for="textinput">分类：<!--category:--></label>
                <select ng-model="post.category" ng-options="c.value as c.name for c in categoryList" required>
                    <option value="">-- 请选择 --</option>
                </select>
            <!--</div>-->
            <!--<div class="form-group">-->
                <label class="control-label" for="textinput"><!--desc:--></label>
                <textarea class="control-label" rows="5" ng-model="post.desc" required style="width:100%"
                          tabindex="7"></textarea>
            </div>
            <div class="form-group">
                <label class="control-label" for="textinput">图片(最多可上传6张):</label>
                <input type="file" id="images_upload"
                       onchange="angular.element(this).scope().selectFile(this.files)" multiple accept="image/*">
                <div id="image_result" class="image-result"></div>
            </div>
            <div class="form-group">
                <label class="control-label" for="textinput"><!--community:--></label>
                <br>
                <label ng-repeat="m in tagList.data">
                    <input style="zoom:1.8;margin-left: 10px;vertical-align:middle" type="checkbox" ng-model="chk"
                           ng-click="tagToggle(chk,m.objId)"/>{{m.value}}
                </label>
            </div>

            <div class="form-group">
                <a ng-click="gotoQuestionListPage()" class="btn btn-xs btn-primary">取消</a>
                <a ng-click="postPage(post)" class="btn btn-xs btn-primary">确定</a>
            </div>
        </form>

        <div class="modal fade" id="usernumber_model" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span
                                aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h5 class="modal-title" id="myModalLabel">发帖账号详情</h5>
                    </div>
                    <div class="modal-body">
                        <form class="form-inline">
                            <!--<div class="form-group">-->
                                <!--<label style="float: left; margin-left:0px" class="control-label" for="textinput">发帖号码:</label>-->
                                <label class="control-label" style="float: left;vertical-align:middle ;margin-left:0px;" for="textinput">发帖号码:</label>
                                <input type="text" class="form-control" placeholder="" style="float: left;margin-left:0px;width: 260px"
                                       ng-model="sendNumber">&nbsp;&nbsp;
                                <button style="float: left" id="addbtn" type="submit" class="form-control btn btn-secondary"
                                        ng-click="addNewNumber(sendNumber)">添加
                                </button>
                            <!--</div>-->
                        </form>
                        <div id="tab_user">
                            <table class="table">
                            <thead>
                            <tr>
                                <th>小号</th>
                                <th>昵称</th>
                                <th>小区</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="user in userList">
                                    <td>{{user.huanxinUserName}}</td>
                                    <td>{{user.nickName}}</td>
                                    <td>{{user.community.communityName}}</td>
                                    <td>
                                        <button id="delbtn" type="submit" class="btn btn-default"
                                                 ng-click="deleteNumber(user)">删除
                                        </button>
                                    </td>

                                </tr>
                            </tbody>
                        </table>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button id="saveButton" type="submit"class="btn btn-default"
                                ng-click="saveNumber()">保存
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal fade" id="selectnumber_model" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">

                    </div>
                    <div class="modal-body">

                        <form class="form-inline" style="text-align: left;">
                            <label style="margin-left:10px" class="control-label" for="textinput">集合名称:</label>
                            <select id="optGroup" ng-model="groupId" style="margin-left:10px"
                                    ng-options="m.objId as m.groupName for m in numberGroupList.data">
                                <option value="">-- 请选择 --</option>
                            </select>
                            <label style="margin-left:10px" class="control-label"  for="textinput">小区:</label>
                            <input style="margin-left:10px" class="form-control" type = "text" id = "community_select" ng-model="communityId" value = "">
                            <label style="margin-left:10px" for="textinput">昵称:</label>
                            <input style="margin-left:10px" type="text" ng-model="nickName" id="reply">

                            <button type="button" class="btn btn-default" style="margin-left:20px" ng-click="groupChange(communityId,groupId,nickName)">查询</button>
                        </form>
                        <br><br>
                        <div>
                            <label style="float:left;">
                                <input style="float:left;zoom:1.2;margin-left: 10px;" ng-model="ck"
                                       type="checkbox" ng-click="allCheck(ck,openType)"/>全选
                            </label>

                            <span style="float: right">
                                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                <button type="submit"class="btn btn-default" ng-click="Confirm()">确认</button>
                            </span>

                            <table class="table">
                                <thead>
                                <tr>
                                    <th>选择</th>
                                    <th>小号</th>
                                    <th>昵称</th>
                                    <th>小区</th>
                                    <th>备注</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="user in selectuserList">
                                    <td width="20"><input type="checkbox" name="chkItem" ng-model="questioncheck" ng-click="userToggle(user)" ng-change="checkChange(chc)"/> </td>
                                    <td>{{user.user.huanxinUserName}}</td>
                                    <td>{{user.user.nickName}}</td>
                                    <td>{{user.community.communityName}}</td>
                                    <td>{{user.userRemark}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="submit"class="btn btn-default"
                                ng-click="Confirm()">确认
                        </button>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>